  <form action="<?php echo $PHP_SELF; ?>" method="POST">
	<h3>User</h3>
	<input type="hidden" name="id" value="<?php echo $c->user->id; ?>"/>
	<table border=0 id="data">
		<?php
		if ($c->user->id == 0)
		{
		?><tr><th>Username:</th><td><input type="text" name="username" value="<?php echo $c->user->username; ?>" /></td></tr><?php
		} else {
		?><tr><th>Username:</th><td><input type="hidden" name="username" value="<?php echo $c->user->username; ?>" /><?php echo $c->user->username; ?></td></tr><?php
		}
		?>
    	<tr><th>Password:</th><td><input type="password" name="password" value="" /></td></tr>
    	<tr><th nowrap>First Name:</th><td><input type="text" name="firstname" value="<?php echo $c->user->firstname; ?>" /></td></tr>
    	<tr><th>Last Name:</th><td><input type="text" name="lastname" value="<?php echo $c->user->lastname; ?>" /></td></tr>
    	<tr><th>E-mail:</th><td><input type="text" name="email" value="<?php echo $c->user->email; ?>" /></td></tr>
    	<tr><th>Roles:</th><td>
			<select name="roles[]" size="9" multiple >
			    <?php foreach ($c->roles as $role) {
			    	if ($role != "") { ?>
			   	    	<option <?php if (array_search($role, $c->userRoles) !== false) { echo " selected"; } ?>><?php echo $role; ?></option>
			    <?php }
			    	}
			    ?>
			</select>
        </td></tr>
    	<tr><td>&nbsp;</td><td><input type="submit" name="action" value="Save" /><input type="submit" name="action" value="Cancel" /></td></tr>
    </table>


    <?php foreach ($c->users as $user) { ?>
    	<?php echo HtmlUtil::internalLink($user->username . "<br/>", "admin", $userRoles, array("action" => "load", "id" => $user->id)); ?>
    <?php } ?>

  </form>